#-*- coding:utf-8 -*-

BD2_SIZE = 79

def BDXor(d):
    xor = 0
    for i in range(1, len(d)):
        xor ^= d[i]
    return d + ("*%02X\r\n" % xor).encode()
